<template>
    <ul class="popup-menu-list">
        <li :key="item.name" :class="{separater:item.separater}" v-for="item of items" @click="command(item.command)"><span>{{item.name}}</span></li>
    </ul>
</template>

<script>
    export default {
        name: "TPopupMenu",
        props: {
            items: {
                type: Array,
                default() {
                    return [];
                }
            }
        },
        methods: {
            command(command) {
                this.$emit('command', command)
            }
        }

    }
</script>

<style scoped>

</style>
